/* 全局样式 */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5f6fa;
    --text-color: #333;
    --border-color: #e1e4e8;
    --hover-color: #357abd;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

/* 主要内容区域 */
.forum-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* 论坛头部样式 */
.forum-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 40px 30px;
    margin-bottom: 30px;
    color: white;
    text-align: center;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.header-content h1 i {
    font-size: 2rem;
    color: #ffd700;
}

.header-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* 筛选区域样式 */
.filter-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.filter-container {
    padding: 25px;
}

/* 搜索功能样式 */
.search-container {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.search-box input::placeholder {
    color: #999;
    font-style: italic;
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.search-btn:active {
    transform: scale(0.95);
}

.search-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.search-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: color 0.3s ease;
}

.search-option:hover {
    color: #667eea;
}

.search-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
    cursor: pointer;
}

.search-option span {
    font-weight: 500;
}

/* 搜索结果显示样式 */
.search-results-info {
    background: linear-gradient(135deg, #e8f4fd 0%, #d1ecf1 100%);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-results-info .results-count {
    font-weight: 600;
    color: #333;
}

.search-results-info .clear-search {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-results-info .clear-search:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

/* 搜索加载状态样式 */
.search-loading {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.search-loading i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
    display: block;
}

.search-loading p {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

/* 筛选选项容器 */
.filter-options {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    font-size: 14px;
}

.filter-group select {
    padding: 8px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 120px;
}

.filter-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.new-post-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-left: auto;
    white-space: nowrap;
}

.new-post-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 帖子列表样式 */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.type-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-badge.guide {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border: 1px solid #90caf9;
}

.type-badge.discussion {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

.type-badge.news {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.type-badge.video {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc80 100%);
    color: #ef6c00;
    border: 1px solid #ffb74d;
}

.post-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
}

.post-content {
    margin-bottom: 20px;
}

.post-preview {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 15px;
}

.post-images {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.post-images img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.post-images img:hover {
    transform: scale(1.02);
}

.video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-overlay:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #666;
    font-size: 14px;
}

.author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.author img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.post-actions {
    display: flex;
    gap: 12px;
}

.like-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.like-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    transform: translateY(-1px);
}

.like-btn i {
    font-size: 16px;
    transition: all 0.3s ease;
}

.like-btn:hover i {
    transform: scale(1.1);
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding: 20px 0;
}

.page-numbers {
    display: flex;
    gap: 8px;
}

.page-numbers span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-numbers span:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-numbers span.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.prev-page,
.next-page {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.prev-page:hover,
.next-page:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
    display: block;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* 错误状态样式 */
.post-error {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.post-error i {
    font-size: 48px;
    color: #ff6b6b;
    margin-bottom: 20px;
    display: block;
}

.post-error p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #ff6b6b;
}

/* 加载按钮样式 */
.load-posts-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.load-posts-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.load-posts-btn:active {
    transform: translateY(0);
}

/* 分页样式优化 */
.pagination .page-numbers span {
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination .page-numbers span:hover {
    background-color: #667eea;
    color: white;
}

/* 帖子卡片加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .filter-container {
        padding: 15px;
    }
    
    .filter-options {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    
    .filter-group label {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .filter-group select {
        width: 100%;
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .new-post-btn {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .empty-state,
    .post-error {
        padding: 40px 20px;
    }
    
    .empty-state i,
    .post-error i {
        font-size: 2.5rem;
    }
    
    /* 搜索功能移动端样式 */
    .search-container {
        margin-bottom: 15px;
        padding-bottom: 15px;
    }
    
    .search-box {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .search-box input {
        width: 100%;
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .search-btn {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }
    
    .search-options {
        justify-content: center;
        gap: 15px;
    }
    
    .search-option {
        font-size: 13px;
    }
    
    .search-results-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .search-results-info .results-count {
        font-size: 14px;
    }
    
    .search-results-info .clear-search {
        align-self: center;
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .search-loading {
        padding: 40px 15px;
    }
    
    .search-loading i {
        font-size: 2rem;
    }
    
    .search-loading p {
        font-size: 1rem;
    }
} 